import request from '@/utils/request'

// 机构列表
export function merchantList(query) {
    return request({
      url: '/jbl-business/api/admin/v1/business/select/page',
      method: 'get',
      params: query
    })
  }
  
  // 更改机构状态
  export function merchantStatus(query) {
    return request({
      url: '/jbl-business/api/admin/v1/business/dismountGrounding',
      method: 'get',
      params: query
    })
  }

// 机构详情
export function merchantDetail(query) {
    return request({
      url: '/jbl-business/api/admin/v1/business/getById',
      method: 'get',
      params: query
    })
  }

  // 机构更新
export function merchantUpdate(data) {
    return request({
      url: '/jbl-business/api/admin/v1/business/updateById',
      method: 'post',
      data
    })
  }

  // 机构分类
export function merchantType(query) {
    return request({
      url: '/jbl-business/api/v1/category/getByParentId',
      method: 'get',
      params: query
    })
  }

  // 获取所有标签
export function getAllLabels(query) {
    return request({
      url: '/jbl-business/api/admin/v1/label/getByConditions',
      method: 'get',
      params: query
    })
  }

  // 机构所有分类
export function merchantAllType(query) {
    return request({
      url: '/jbl-business/api/v1/category/getCategoryAll',
      method: 'get',
      params: query
    })
  }
